<script>
    $(function(){
        var link = $(".nav-con li a");
        var url = location.pathname;
        var noBorder = true;
        //改变侧边栏选中时状态
        for( var i = 0, len = link.length; i < len; i++ ) {

            var r = link[i].href;

            if(r.search(url) != -1){

                link.eq(i).parent().addClass('cur');

                noBorder = false;
            }

        }

        //如果没有找到匹配的，把导航第一个设置为选中状态
        if( noBorder ) {
            $('.nav-con li').first().addClass('cur')
        }

    });
</script>